package com.liangjie;

public class Substring {
	public static void main(String[] args) {
		String path = "C:/java/test.txt";
		path = "C:\\java\\test.txt";
		
		int index = path.lastIndexOf('\\');
		String str = path.substring(index + 1);
		
		System.out.println(str);
	}
}
